import Vue from 'vue'

import App from './App'
import router from './router' // vue-route
import store from './store' // vuex

import Cookies from 'js-cookie'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'normalize.css/normalize.css'

import '@/styles/mine.scss'

import i18n from './lang' // 国际化
import '@/icons' // 图标
import '@/permission' // 路由权限处理
import lodash from 'lodash' //加载lodash工具
import utils from '@/utils/baseUtils' //加载自定义工具
import http from '@/utils/request' //加载http工具

Vue.use(ElementUI, {
  size: Cookies.get('size') || 'medium', // set element-ui default size
  i18n: (key, value) => i18n.t(key, value)
})

Vue.prototype.$_ = lodash
Vue.prototype.$ace = utils
Vue.prototype.$http = http;

Vue.config.productionTip = false
window.log = console.log

new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: h => h(App)
})
